<?php
/************************************************
* File Name: 	layout.php						*
* Purpose:		Default layout					*
* Created at: 	17 December2011					*
* Developed By: Subhojit Mukherhee 				*
* Author: 		Subhojit Mukherhee				*
* Copyrited to:	www.scienceanddevelops.com		*
*************************************************/
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="SHORTCUT ICON" href="<?=base_url('favicon.ico')?>"/>
	<title><?=$viewTITLE;?></title>
	
	<link href="<?=base_url('css/style.css')?>" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="<?=base_url('css/gaf_style.css')?>" />
	<link href="<?=base_url('css/login.css')?>" type="text/css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?=base_url('fancybox/jquery.fancybox-1.3.4.css')?>" media="screen" />
	<?php if(count($viewCSS)): foreach($viewCSS as $css):?>
	<link href="<?=base_url($css)?>" type="text/css" rel="stylesheet" />
	<?php endforeach; endif; ?>
	
	<script type="text/javascript">var SITE_URL = '<?=site_url()?>';</script>
	<script type="text/javascript" src="http://jquery.com/src/jquery-latest.pack.js"></script> <!-- IMPORTANT -->
	<script type="text/javascript" src="<?=base_url('js/jquery-fix.min.js')?>"></script> <!-- IMPORTANT -->
	<script type="text/javascript" src="<?=base_url('js/scripts.js')?>"></script> <!-- IMPORTANT -->
	<script type="text/javascript" src="<?=base_url('js/cart.js')?>"></script>
	<script type="text/javascript" src="<?=base_url('fancybox/jquery.mousewheel-3.0.4.pack.js')?>"></script>
	<script type="text/javascript" src="<?=base_url('fancybox/jquery.fancybox-1.3.4.pack.js')?>"></script>
	<script type="text/javascript">
		function show_success_mesg(msg, modal)
		{
			modal = (typeof modal !== 'undefined' && modal === true);
			$('#fancybox_success_mesg').html(msg);
			$.fancybox({'href':"#fancybox_success_mesg", 'overlayColor':'#0c6', 'title':"Success Message", 'modal':modal});
		}
		function show_error_mesg(msg, modal)
		{
			modal = (typeof modal !== 'undefined' && modal === true);
			$('#fancybox_success_mesg').html(msg);
			$.fancybox({'href':"#fancybox_success_mesg", 'overlayColor':'#dd5050','title':"Error Message", 'modal':modal});
		}
		function show_waiting_mesg(msg, completeCb)
		{
			$('#fancybox_waiting_mesg').html(msg);
			$.fancybox(
					{
						'href':"#fancybox_waiting_mesg", 
						'overlayColor':'#edd848',
						'modal':true,
						'onComplete':completeCb
					}
			);
		}
		$(document).ready(function(e) {
			SITE_URL = '<?=site_url()?>';
			<?php 
				$tttt = $this->session->flashdata('success_mesg');
				if(strlen($tttt) > 0) echo 'show_success_mesg(unescape("' . rawurlencode($tttt) . '"))';
				$tttt = $this->session->flashdata('error_mesg');
				if(strlen($tttt) > 0) echo 'show_error_mesg(unescape("' . rawurlencode($tttt) . '"))';
			?>
		});
	</script>
	<?php if(count($viewJS)): foreach($viewJS as $js):?>
	<script language="javascript" type="text/javascript" src="<?=base_url($js)?>"></script>
	<?php endforeach; endif; ?>
</head>
<body>
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=149550091819973";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
	<div class="main_div">
		<div class="wrapper_index">

			<!-- Header Area -->
			<?php if($inner_header_inc !== FALSE) $this->load->view($inner_header_inc);?>              
			<!-- End Header Area -->
			
			<!-- Start Banner Area -->
			<?php if($banner_inc !== FALSE) $this->load->view($banner_inc);?>
			<!-- End Banner Area -->                      
			
			<!-- Start Search Form -->
			<?php if($search_inc !== FALSE) $this->load->view($search_inc);?>
			<!-- End Search Form -->
			
			<!-- Start Page Specific View -->
			<?php if($viewFile) $this->load->view($viewFile); ?>
			<!-- End Page Specific View -->
			
			<!-- Start Upper Footer Area -->
			<?php if($upper_footer_inc !== FALSE) $this->load->view($upper_footer_inc);?>    
			<!-- End Upper Footer Area --> 
			
			<!-- Start Footer Area -->
			<?php if($footer_inc !== FALSE) $this->load->view($footer_inc);?>    
			<!-- End Footer Area -->   

		</div>
	</div>
	<div style="display: none">
		<div id="fancybox_success_mesg"></div>
		<div id="fancybox_error_mesg"></div>
		<div id="fancybox_waiting_mesg"></div>
	</div>
</body>
</html>
